package com.lkj.controller;


import com.lkj.entity.Dept;
import com.lkj.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/dept")
public class DeptController {

    @Autowired
    private DeptService deptService;

    @RequestMapping("/detail")
    @ResponseBody
    public String index(@RequestParam("id") String id){
        Dept dept = deptService.selectById(id);

        System.out.println("reamrk:"+dept.getRemark());

        return dept.getRemark();
    }
}
